<?php

namespace IDock\Insurance\DAJIA\Response;

use IDock\Http\Response;
use IDock\Insurance\DAJIA\Response\AllDAJIAResponse;
use IDock\Printer\Premium\PremiumInquiryPrinter;

class PreInquiryResponse extends AllDAJIAResponse
{

    public function printerInit(): Response
    {
        $premiumInquiryPrinter = new PremiumInquiryPrinter();

        $premiumInquiryPrinter->argc['orderNo'] =  $this->get('body',[])['result']['orderNo'] ?? '';
        $premiumInquiryPrinter->argc['busiId'] = 'HXY'.date('His').rand(10000000,99999999);

        $this->printer = $premiumInquiryPrinter;
        return $this;
    }

}